home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 271_02 / hstr_i.doc < prev    next >
Text File  |  1987-08-18  |  770b  |  33 lines

  1.  
  2.  
  3.  
  4.         NAME
  5.                 hstr_i -- make an ascii hexadecimal string into an integer
  6.  
  7.         SYNOPSIS
  8.                 c = hstr_i(p);
  9.                 char *p;          string of ascii characters
  10.                 unsigned int c;   returned hex value
  11.  
  12.  
  13.         DESCRIPTION
  14.         Read a string of ascii hexadecimal digits (0-9, A-F) and create
  15.         an integer from the result.  String must begin with a hex digit.
  16.         Calculation proceeds to first non-hex digit or NULL terminator.
  17.  
  18.  
  19.         EXAMPLE
  20.  
  21.                char string[] = "1A5C*";
  22.                int result;
  23.                result = hstr_i(string);
  24.                  result will equal 0x1A5C
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.         This function is found in SMTCx.LIB for the Turbo-C Compiler
  33.